<script type="text/javascript">
var enable_submit = true;
$(function() {
    var obj = {
        "qos_name": "由1到32位小写英文字母、数字、中划线或下划线构成",
        'iops': 'IOPS峰值必须为大于0的整数。',
        'mbps': 'MBPS峰值必须为大于0的整数。'
    }
    bindMouseEvent('#qos_update_modal', obj);
});
</script>
<div class="modal-header">
    <h3>编辑QoS</h3>
</div>
<div class="modal-body modal-body-height" id="qos_update_modal" title="update">
    <div class="qos-update-box">
    <div class="rtn-tip"></div>
        <table class="base-info">
            <tr>
                <td>
                    <label>名称</label><a>*</a>
                </td>
                <td colspan="3">
                    <input id="qos_name_cr" name="qos_name_cr" size="25" type="text" value="{{ qos.name |default('', True) }}" />
                    <i class="fa fa-question-circle" itype="qos_name"></i>
                </td>
            </tr>
            <tr>
                <td>
                    <label>IOPS峰值</label><a>*</a>
                </td>
                <td>
                    <input id="throt_burst_iops_max" name="throt_burst_iops_max" size="25" max="10000" min="1" type="text" value="{{ qos.throt_burst_iops_max |default('', True) }}" />
                    <i class="fa fa-question-circle" itype="iops"></i>
                </td>
                <td style="text-align: left; width: 12.5%;">
                    <label>MBPS峰值</label><a>*</a>
                </td>
                <td style="width: 37.5%;">
                    <input id="throt_burst_mbps_max" name="throt_burst_mbps_max" size="25" max="10000" min="1" type="text" value="{{ ((qos.throt_burst_mbps_max|int) /1024/1024)|int |default('', True) }}" />
                    <span class="unit">MB</span>
                    <i class="fa fa-question-circle" itype="mbps"></i>
                </td>
            </tr>
        </table>
    </div>
    <div class="error-tip">
        <p></p><span></span>
    </div>
    <div class="tip">
        <p></p><span></span>
    </div>
</div>
<div class="modal-footer">
    <button class="btn btn-blue" ng-click="update('{{qos.id}}')">[[ 'label ok'|translate ]]</button>
    <button class="btn btn-white" ng-click="cancel()">[[ 'label cancel'|translate ]]</button>
</div>
